Data Assimilation for One-dimensional GW flow model

Data assimilation combines model predictions and observations. In this notebook, the model will be setup first and then it will be used to generate a set of synthatic observations.

Config Parameters

In this exercise, we will use multiple user configuration parameters. To make things clean, we used the a configuration file to hold all these parameters.

Setup workspace

Create a template folder that will contain model executable, model input files, and model output files. It is called "template" because the worker will be generated from it.

Model description

A Python function "generate_1d_model" is used to setup a 1D GW flow model as well as misc files that we will be used and shown in this notebook. The following are the main features in the model:-

Let us generate the model and look more at it's component. For detailed information about model setup, please see "generate_1d_model" in file model_setup. Let Look us at output at the end of the simulation.

The GW pumping causes a depression cone to develop and grow with time.

Simplifying Model I/O

We write a Python warapper that takes one file for each parameter group and generate one output file as output. Let us look at the model input files. Output file is similar to observation data section. This is just a personal preference! you may still deals with the native MODFLOW I/O files.

The model script (model_setup.py) has a function called "forward_model" that will work as our model.

Problem dimensions

Let us run the model and look at output file

In sequential Data Assimilation, we need to be able to rerun the model starting from any arbitrary time point and stop at any other time point . The Python wrapper, that works as our model, uses a simple csv input file with two parameters: start time and end time. In this example we are going to divide the 24 stress periods into 4 cycles.

Additionally, we have a master file that holds all transient information that define what pumping (Qw), recharge (Rch), and reference heads at boundary conditions, that are used. In MODFLOW, we also we need to define the stress period length and number of time steps in each stress period. In a more complex model setup, we might need to define a file groundwater pumping; in this case this csv file might contain a pumping file name for each stress period.

Setup the PEST files

Input/Template files

We have three files..

output/instruction files

Generate prior parameters/states ensemble

Notice that we have three input files, but only two has adjustable parameters/states: hk.dat and iheads.dat. The file input_dis.csv has data that only needed to restart the model. All adjustable states/parameters need prior ensembles

Observations

As mesnioned before, DA combine model with observations. This is just a synthatic problem, so we need to generate synthatic observations. The observation is generated by simulating a truth parameters (reference realization), which is a a user defined in the init file.

Let us run the model using the assumed synthatic reality and produce our measurements...

Cycle tables

At each cycle we need to define the observations to be assimilated, theirs weights, and non-adjustable parameters to used that are needed to restart the model to simulate each cycle. Cycle tables are a nice option to so

PESTPP-DA Control Files

Run PESTPP-da...